home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / HD-Installer / jst_dev / sources / src / loaders / SuperWonderboy / swboyhd.asm < prev   
Assembly Source File  |  2000-04-12  |  1KB  |  73 lines

  1. ; *** Super WonderBoy Hard Disk Loader V1.0
  2. ; *** Written by Jean-François Fabre
  3.  
  4. ; *** Needs 1.5MB of memory to run
  5.  
  6.  
  7.     include    "jst.i"
  8.  
  9.     HD_PARAMS    "swboy.d",STD_DISK_SIZE,1
  10.  
  11. loader:
  12.     Mac_printf    "Super Wonderboy HD Loader V1.2"
  13.     Mac_printf    "Coded by Jean-François Fabre © 1997"
  14.     NEWLINE
  15.     Mac_printf    "Trainer by Harry"
  16.  
  17.     JSRABS    LoadDisks
  18.  
  19.     moveq.l    #0,D0
  20.     move.l    #CACRF_CopyBack,D1
  21.     JSRABS    Degrade
  22.  
  23.     GO_SUPERVISOR
  24.     SAVE_OSDATA    $80000
  25.     move    #$2700,SR
  26.  
  27.     JSRGEN    InitTrackDisk
  28.     
  29.     move.w    #2,$1C(A1)
  30.     move.l    #$80C00,$2C(A1)
  31.     move.l    #$33400,$24(A1)
  32.     move.l    #$400,$28(A1)
  33.     JSRGEN    TrackLoad
  34.  
  35.     PATCHUSRJMP    $D03C,PatchLoad
  36.     PATCHUSRJSR    $CC22,KbInt
  37.  
  38.     ; **** boot stuff and patch
  39.  
  40.     JSRGEN    FlushCachesHard
  41.  
  42.     JMP    $400.W
  43.  
  44. KbInt:
  45.     lea    $CCE5,A0
  46.  
  47.     cmp.b    #$59,D1
  48.     bne    noquit$
  49.     JSRGEN    InGameExit
  50. noquit$
  51.     cmp.b    #$5F,D1
  52.     bne    noswaptr$
  53.     EOR.W    #(~$9179&$4A79)!($9179&~$4a79),$64fc.w
  54.     JSRGEN    FlushCachesHard
  55. noswaptr$
  56.     rts
  57.  
  58. PatchLoad:
  59.     STORE_REGS
  60.  
  61.     mulu    #$200,D0
  62.     move.l    D0,D2
  63.     moveq.l    #0,D0
  64.     move.l    A1,A0
  65.     JSRGEN    ReadDiskPart
  66.  
  67.     RESTORE_REGS
  68.     move.l    (A7)+,A0    ; original game
  69.     rts
  70.  
  71.  
  72.  
  73.